home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 1
/
Nebula One.iso
/
Utilities
/
Workspace
/
Locus
/
Source
/
Globals.m
< prev
next >
Wrap
Text File
|
1995-06-12
|
3KB
|
133 lines
/*
Copyright 1993 Jeremy Slade.
You are free to use all or any parts of the Locus project
however you wish, just give credit where credit is due.
The author (Jeremy Slade) shall not be held responsible
for any damages that result out of use or misuse of any
part of this project.
*/
/*
Project: Locus
File: Globals.m
Description: See Globals.h
Original Author: Jeremy Slade
Revision History:
Created
V.101 JGS Mon Feb 1 22:30:58 GMT-0700 1993
*/
#import "Globals.h"
#import "Activator.h"
#import "AppIconView.h"
#import "Inspector.h"
BOOL isAutoLaunch;
BOOL DEBUGGING;
/*
* Preferences ------------------------------------------------------
*/
BOOL autolaunchHide;
int activatorMask;
BOOL floatActivator;
NXColor activatorFillColor;
NXColor activatorBorderColor;
NXRect defaultViewerFrame;
BOOL verifyActions;
BOOL autoSave;
BOOL activatorAdd;
BOOL appIconAdd;
int inspectorMode;
NXPoint inspectorLocation;
BOOL hideDeactive;
id startupFolders;
NXDefaultsVector Defaults = {
{ PREF_ACTIVATOR_MASK, "15" }, // Defaults to all bars on
{ PREF_AUTOLAUNCH_HIDE, "NO" },
{ PREF_ACTIVATOR_FLOAT, "YES" }, // Defaults to floating
{PREF_ACTIVATOR_COLOR, "1.0 1.0 1.0" }, // White
{PREF_ACTIVATOR_BORDER, "0.0 0.0 0.0" }, // Black
{ PREF_VIEWER_FRAME, "100 300 250 380" },
{ PREF_VERIFY, "YES" },
{ PREF_AUTOSAVE, "NO" },
{ PREF_ADD_ACTIVATOR, "YES" },
{ PREF_ADD_APPICON, "YES" },
{ PREF_INSPECTORMODE, "None" },
{ PREF_INSPECTORLOCATION, "8 204" },
{ PREF_HIDEDEACTIVE, "YES" },
{ PREF_STARTUPFOLDERS, DEFAULT_FOLDER"."FOLDER_EXT },
{ NULL }
};
// Valid types for drag in operations
const char *dragInTypes[DRAGINTYPES];
/*
* Other Global Variables -------------------------------------------------
*/
// The MainController
id mainController = nil;
// The FolderController
id folderController = nil;
// The Inspector
id inspector = nil;
// The Activator
id activator;
// The AppIcon View
id appIconView = nil;
unsigned int appIconNum = 0;
void initGlobals ( void )
{
// Set dragInTypes
dragInTypes[0] = NXFilenamePboardType;
// Create the activator
activator = [[Activator alloc] init];
[activator setBar:activatorMask on:YES];
[activator setFloating:floatActivator];
[activator setColor:activatorFillColor];
[activator setBorderColor:activatorBorderColor];
[activator setDelegate:mainController];
[activator setDraggingEnabled:activatorAdd];
// Set up appIconView
appIconView = [[AppIconView alloc] init];
[appIconView attachToIcon:[NXApp appIcon]];
[appIconView setIcon:"InactiveIcon"];
[appIconView setDraggingEnabled:appIconAdd];
// Create inspector
inspector = [[Inspector alloc] init];
return;
}